import request from '@/utils/request';

// 获取快站账号列表
export function accountList(params) {
    return request({
        url: '/kz/account/list',
        method: 'get',
        params
    });
}

// 新增快站账号
export function addAccount(data) {
  return request({
    url: '/kz/account/add',
    method: 'post',
    data
  });
}

// 修改快站账号
export function editAccount(data) {
  return request({
    url: `/kz/account/edit`,
    method: 'post',
    data
  });
}

// 同步快站账号下所有站点
export function syncAccount(id) {
  return request({
    url: `/kz/account/sync/${id}`,
    method: 'get',
  });
}

// 获取站点列表
export function siteList(params) {
  return request({
    url: '/kz/site/list',
    method: 'get',
    params
  });
}

// 同步快站站点
export function siteSync(params) {
  return request({
    url: '/kz/site/sync',
    method: 'get',
    params
  });
}

// 修改快站站点
export function siteEdit(data) {
  return request({
    url: `/kz/site/edit`,
    method: 'post',
    data
  });
}

// 检测站点域名是否被微信封禁
export function checkBan(params) {
  return request({
    url: `/kz/site/checkBan`,
    method: 'get',
    params
  });
}

// 获取站点当前内容
export function getContent(params) {
  return request({
    url: `/kz/site/content`,
    method: 'get',
    params
  });
}


export function siteHistory(query) {
  return request({
    url: `/kz/site/history`,
    method: 'get',
    params: query
  });
}
